<?php
namespace Nawa\MedicalStudy\MedicalCenter\Monitoring;
/**
 * Medical Center Partners Documents.
 *
 * It represant a document attached to a medical center
 *
 * @author Xavier VILAIN
 * @package Nawa\MedicalStudy\MedicalCenter
 * @license
 *
 * @property int	$msid			Id of the medical study
 * @property int	$mcid			Medical Center
 * @property int	$monitoringid	Monitoring Id
 * @property int	$docid			Document Id
 */
class Document extends \Fox\Object {

	/**
	 * Link to Medical Study
	 */
	const LINK_MEDICAL_STUDY = "medicalStudy";

	/**
	 * Link to Medical Center
	 */
	const LINK_MEDICAL_CENTER = "medicalCenter";

	/**
	 * Link to Medical Center
	 */
	const LINK_MONITORING = "monitoring";
	
	/**
	 * Link to Document
	 */
	const LINK_DOCUMENT = "document";

}
\Fox\Dao::infos(Document::className(),
new \Fox\Object\Info('ms_mc_monitoring_documents', \Fox\Databases::DB_APP)
);
// Link to Document
\Fox\Object\Links::add(\Fox\Dao::link(Document::className(),Document::LINK_DOCUMENT)
->to(\Nawa\Document::className(),Document::LINK_MONITORING)
->on('docid'));